//
//  Data.swift
//  
//
//  Created by tangbl93 on 2021/1/21.
//

import Foundation

public extension Data {
    
    /// base64 encoding
    func yx_base64(with urlEncoding:Bool = true) -> String? {
        if urlEncoding {
            return base64EncodedString().yx_URLEncoding(with: urlEncoding)
        }
        return base64EncodedString()
    }
}
